<?php 
$link = mysqli_connect("localhost","root","root","2113");
$pname=$_POST['pname'];
$pname1=$_POST['pname1'];
$price=$_POST['price'];

// $path = $_FILES['img']['tmp_name'];
// move_uploaded_file($path,"../img/".$_FILES['img']['name']);

$str="img/".$_FILES['img']['name'];
echo $str;
// $str2="img/".$_FILES[1]['img']['name'];
$str2="img/".$_FILES['img2']['name'];
echo $str2;
$sql = "INSERT INTO products(pname,pname1,price,img,img2) VALUES ('$pname','$pname1','$price','$str','$str2')";
$res =  mysqli_query($link,$sql);



?>